<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo ($System_namex); ?></title>
<link href="__PUBLIC__/Css/body.css" rel="stylesheet" media="screen" type="text/css" />
<link href="__PUBLIC__/Css/menu.css" rel="stylesheet" media="screen" type="text/css" />
<link href="__PUBLIC__/Css/main.css" rel="stylesheet" media="all" type="text/css" />
<script type="text/javascript">document.write("<scr"+"ipt src=\"__PUBLIC__/Js/Base.js\"></sc"+"ript>")</script>
<script type="text/javascript">document.write("<scr"+"ipt src=\"__PUBLIC__/Js/prototype.js\"></sc"+"ript>")</script>
<script type="text/javascript">document.write("<scr"+"ipt src=\"__PUBLIC__/Js/mootools.js\"></sc"+"ript>")</script>
<script type="text/javascript">document.write("<scr"+"ipt src=\"__PUBLIC__/Js/Ajax/ThinkAjax.js\"></sc"+"ript>")</script>
<script type="text/javascript">document.write("<scr"+"ipt src=\"__PUBLIC__/Js/Form/CheckForm.js\"></sc"+"ript>")</script>
<script type="text/javascript">document.write("<scr"+"ipt src=\"__PUBLIC__/Js/common.js\"></sc"+"ript>")</script>
<script type="text/javascript">document.write("<scr"+"ipt src=\"__PUBLIC__/Js/Util/ImageLoader.js\"></sc"+"ript>")</script>
<script type="text/javascript">document.write("<scr"+"ipt src=\"__PUBLIC__/Js/myfocus-1.0.4.min.js\"></sc"+"ript>")</script>
<script type="text/javascript">document.write("<scr"+"ipt src=\"__PUBLIC__/Js/all.js\"></sc"+"ript>")</script>
<script language="JavaScript">
ifcheck = true;
function CheckAll(form)
{
	for (var i=0;i<form.elements.length-2;i++)
	{
		var e = form.elements[i];
		e.checked = ifcheck;
	}
	ifcheck = ifcheck == true ? false : true;
}
</script>
<script>
//function checkLeave(){
//	window.parent.stateChangeIE();
//}
</script>
</head>
<body>

<style type="text/css">
<!--
.apDiv1 {position:relative; width:100%; z-index:100; left: 20px; top: -1px; border:1px solid #CCC; text-align:left; background:#FAFAD2; padding:4PX;}
-->
</style>
<div class="ncenter_box">
<div class="accounttitle"><h1>委托交易处理 </h1></div>
<table border="0" cellpadding="3" cellspacing="8">
  <tr>
    <td><?php if(($ry) == "0"): ?><span class="us_btn">查看全部</span>
      <?php else: ?>
      <input type="button" name="action" value="查看全部" class="btn1" onclick="window.location='__URL__/admin_eblist/ry/0/UserID/<?php echo ($UserID); ?>/'"><?php endif; ?>
      <?php if(($ry) == "1"): ?><span class="us_btn">等待交易</span>
        <?php else: ?>
        <input type="button" name="action" value="等待交易" class="btn1" onclick="window.location='__URL__/admin_eblist/ry/1/UserID/<?php echo ($UserID); ?>/'"><?php endif; ?>
      <?php if(($ry) == "2"): ?><span class="us_btn">等待汇款</span>
        <?php else: ?>
        <input type="button" name="action" value="等待汇款" class="btn1" onclick="window.location='__URL__/admin_eblist/ry/2/UserID/<?php echo ($UserID); ?>/'"><?php endif; ?>
      <?php if(($ry) == "3"): ?><span class="us_btn">等待确认</span>
        <?php else: ?>
        <input type="button" name="action" value="等待确认" class="btn1" onclick="window.location='__URL__/admin_eblist/ry/3/UserID/<?php echo ($UserID); ?>/'"><?php endif; ?>
      <?php if(($ry) == "4"): ?><span class="us_btn">交易完成</span>
        <?php else: ?>
        <input type="button" name="action" value="交易完成" class="btn1" onclick="window.location='__URL__/admin_eblist/ry/4/UserID/<?php echo ($UserID); ?>/'"><?php endif; ?>
      <?php if(($ry) == "5"): ?><span class="us_btn">等待处理</span>
        <?php else: ?>
        <input type="button" name="action" value="等待处理" class="btn1" onclick="window.location='__URL__/admin_eblist/ry/5/UserID/<?php echo ($UserID); ?>/'"><?php endif; ?>
      <?php if(($ry) == "6"): ?><span class="us_btn">处理完成</span>
        <?php else: ?>
        <input type="button" name="action" value="处理完成" class="btn1" onclick="window.location='__URL__/admin_eblist/ry/6/UserID/<?php echo ($UserID); ?>/'"><?php endif; ?>
      </td>
    </tr>
</table>
<table width="100%" class="tab3" border="0" cellpadding="3" cellspacing="0" bgcolor="#b9c8d0" id="tb1">
	<thead>
    <tr align="center">
        <th nowrap width="10%"><span>进场订单</span></th>
        <th nowrap><span>买家编号</span></th>
        <th nowrap><span>出场订单</span></th>
        <th nowrap><span>卖家编号</span></th>
        <th nowrap><span>卖出时间</span></th>
        <th nowrap><span>买入时间</span></th>
        <th nowrap><span>金额</span></th>
        <th nowrap><span>汇款金额</span></th>
        <th nowrap width="15%"><span>状态</span></th>
        <th nowrap width="10%"><span>处理</span></th>
    </tr>
    </thead>
    <?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr class="content_td lz" align="center">
        <td nowrap><?php echo ($vo['order_id']); ?></td>
        <td nowrap>
        <span style="cursor:hand; color:blue" onclick="open_m('<?php echo ($key); ?>')" title="点击查看开户信息"><?php echo ($vo['user_id']); ?></span>
        <div style="position:absolute;">
        <div class="apDiv1" id="menu_t<?php echo ($key); ?>" style="display:none">
        <div align="right"><img src="__PUBLIC__/Images/close.gif" style="cursor:hand;" onclick="close_m('<?php echo ($key); ?>')" title="关闭"/></div>
        <strong>卖家开户银行：</strong><?php echo ($vo['bank_name']); ?><br />
        <strong>开户姓名：</strong><?php echo ($vo['user_name']); ?><br />
        <strong>银行卡号：</strong><?php echo ($vo['bank_card']); ?><br />
        <strong>开户地址：</strong><?php echo ($vo['x1']); ?></div>
        </div>
        </td>
        <td nowrap><?php echo ($vo['b_order_id']); ?></td>
        <td nowrap><?php echo ($vo['b_user_id']); ?></td>
        <td nowrap><?php echo (date('Y-m-d H:i:s',$vo["rdt"])); ?></td>
        <td nowrap><?php echo (date('Y-m-d H:i:s',$vo["bdt"])); ?></td>
        <td nowrap><?php echo ($vo['money']); ?></td>
        <td nowrap><?php echo ($vo['money']); ?></td>
        <td>
        <?php if(($vo["is_sh"]) == "0"): ?>等待审核
        <?php else: ?>
            <?php if(($vo["is_pay"]) == "0"): if(($vo["is_buy"]) == "0"): ?><font color="#FF00FF">等待交易</font><?php endif; ?>
                <?php if(($vo["is_buy"]) == "1"): ?><font color="#EE5C42">等待汇款</font><?php endif; ?>
                <?php if(($vo["is_buy"]) == "2"): ?><font color="#8E388E">等待确认</font><?php endif; endif; ?>
            <?php if(($vo["is_pay"]) == "1"): ?><font color="#AAAAAA">交易完成</font><?php endif; ?>
            <?php if(($vo["is_pay"]) == "2"): ?><font color="#FF0000">等待处理</font><?php endif; ?>
            <?php if(($vo["is_pay"]) == "3"): echo ($vo['bz']); endif; endif; ?>
        </td>
        <td style="padding-bottom:5px; padding-top:5px;">
        <input name="btt1" type="button" id="btt1" value="查看凭证" onclick="{if(confirm('查看凭证？')){window.location='__URL__/changepingzheng/cid/<?php echo $vo[id];?>/';return true;}return false;}" class="btn1"/>
        <?php if(($vo["is_pay"]) == "0"): if(($vo["is_buy"]) == "0"): ?><input name="btt1" type="button" id="btt1" value="撤销匹配" onclick="{if(confirm('您确定要撤销并删除此条交易信息吗？')){window.location='__URL__/admin_eblist_del/cid/<?php echo $vo[id];?>/';return true;}return false;}" class="btn1"/><?php endif; ?>
        <?php if(($vo["is_buy"]) == "1"): ?><input name="btt1" type="button" id="btt1" value="撤销匹配" onclick="{if(confirm('您确定要撤销并删除此条交易信息吗？')){window.location='__URL__/admin_eblist_del/cid/<?php echo $vo[id];?>/';return true;}return false;}" class="btn1"/><?php endif; ?>
        <?php if(($vo["is_buy"]) == "2"): ?><input name="btt1" type="button" id="btt1" value="撤销匹配" onclick="{if(confirm('经过审核，您确定要将交易的金额返还给卖家吗？')){window.location='__URL__/admin_eblist_del/cid/<?php echo $vo[id];?>/';return true;}return false;}" class="btn1"/><br />
        <input name="btt2" type="button" id="btt2" value="完成交易" onclick="{if(confirm('经过审核，您确定要将交易的金额交易给买家吗？')){window.location='__URL__/admin_eblistAC/cid/<?php echo $vo[id];?>/';return true;}return false;}" class="btn1"/><?php endif; endif; ?>
        <!--<?php if(($vo["is_pay"]) == "2"): ?><input name="btt1" type="button" id="btt1" value="金额返还给卖家" onclick="{if(confirm('经过审核，您确定要将交易的金额返还给卖家吗？')){window.location='__URL__/admin_eblistAC/cid/<?php echo $vo[id];?>/stype/1/';return true;}return false;}" class="btn1"/><br />
        <input name="btt2" type="button" id="btt2" value="金额交易给买家" onclick="{if(confirm('经过审核，您确定要将交易的金额交易给买家吗？')){window.location='__URL__/admin_eblistAC/cid/<?php echo $vo[id];?>/stype/2/';return true;}return false;}" class="btn1"/><?php endif; ?>--></td>
    </tr><?php endforeach; endif; else: echo "" ;endif; ?>
    
</table>
<table width="100%" class="tab3_bottom" border="0" cellpadding="3" cellspacing="0" bgcolor="#ffffff">
  <tr>
  <td width="50%"><?php echo ($page); ?></td>
  </tr>
</table>
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="0">
<TR>
    <td align="right">
    <form method='post' action="__URL__/admin_eblist/ry/<?php echo ($ry); ?>/">
    搜索：
      <input type="text" name="UserID" title="帐号查询">&nbsp;&nbsp;&nbsp;&nbsp;
    <input type="submit" name="Submit" value="查询"  class="btn1"/>
    </form>
    </td>
</TR>
</table>
</div>
</body>
</html>
<script>new TableSorter("tb1");</script>
<script>
function open_m(oid){
	var ttt = "menu_t"+oid;
	document.getElementById(ttt).style.display="";
}
function close_m(oid){
	var ttt = "menu_t"+oid;
	document.getElementById(ttt).style.display="none";
}
</script>